diag_to_csr Function

public pure function diag_to_csr(a) result(rst)

Converts a diagonal matrix to a CSR matrix.

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in), dimension(:) :: a

The diagonal matrix to convert.

Return Value type(csr_matrix)

The CSR matrix.